-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use services.Ticker #12668
use services.Ticker #12668
Conversation
I see you updated files related to
|
Quality Gate passedIssues Measures |
This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
bc38e5e
to
c802511
Compare
@@ -120,6 +120,7 @@ func (o *zkSyncL1Oracle) run() { | |||
func (o *zkSyncL1Oracle) refresh() (t *time.Timer) { | |||
t, err := o.refreshWithError() | |||
if err != nil { | |||
o.logger.Criticalw("Failed to refresh gas price", "err", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@simsonraj I had trouble debugging this PR, because these refresh methods are pushing errors to mark the service unhealthy, but without logging anything. These are typically paired with a critical log. Is that appropriate to do in this case, and the other files in this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, I think its appropriate to append an error, but not sure if it needs to be critical if it is polling. At least for zkSync case, it may not be since we dont need gasPrice exactly real-time & not sure how much impact an RPC malfunction will have here. Looking at Arbitrum it seems the intent was to log it as an error.
May be @amit-momin @FelixFan1992, any opinions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if we looked at the timestamp, and only took this action (both log and unhealthy) if we cannot refresh after some threshold of time has passed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logging the error definitely makes sense here. Following the example of other gas estimator code, I think it's ok to log Critical
here. If there's an RPC issue, it's likely a connectivity issue which we'd want to surface to NOPs urgently. Although I'm sure other components would also start making some noise for it.
Quality Gate passedIssues Measures |
Requires: